package com.sicheng.lc.周赛.分类.思维.数论;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/6/19 10:42
 */
public class 个位数字为K的整数之和 {
    //https://leetcode.cn/contest/weekly-contest-298/problems/sum-of-numbers-with-units-digit-k/
    public int minimumNumbers(int num, int k) {
        if (num == 0)
            return 0;
        for (int i = 1; i <= 10; i++) {
            if (k * i % 10 == num % 10 && i * k <= num)
                return i;
        }
        return -1;
    }
}
